package com.webview;

import android.graphics.Bitmap;
import android.webkit.WebView;
import android.webkit.WebViewClient;

/**
 * Created by 俊峰 on 2016/10/24.
 */
public class MyWebClient extends WebViewClient {

    private GetData mGetData;

    public MyWebClient(GetData getData) {
        mGetData = getData;
    }

    @Override
    public void onPageStarted(WebView view, String url, Bitmap favicon) {
        if (mGetData != null) {
            mGetData.onPageStarted(view, url, favicon);
        }
    }

    @Override
    public void onPageFinished(WebView view, String url) {
        if (mGetData != null) {
            mGetData.onPageFinished(view, url);
        }
    }

}
